# coding: utf-8
from __future__ import (print_function, unicode_literals)

import sys
sys.path.append('..')

from Pinyin2Hanzi import DefaultDagParams
from Pinyin2Hanzi import dag

dagparams = DefaultDagParams()


result = dag(dagparams, ['si', 'chuan', 'cheng', 'du'])
for item in result:
    print(item.score, '/'.join(item.path))

print(20*'*')


result = dag(dagparams, ['s', 'c', 'c', 'd'])
for item in result:
    print(item.score, '/'.join(item.path))

print(20*'*')